// 定义路由组件
import {
	createRouter,
	createWebHistory
} from 'vue-router'

const router = createRouter({
	history: createWebHistory(import.meta.env.BASE_URL),
	routes: [
        {
			path: '/',
			redirect: '/home'
		},
		{
			path: '/home',
			name: 'home',
			component: () => import('../views/HomeView.vue')
		},
		{
			path: '/iffor',
			name: 'iffor',
			component: () => import('../views/If-For.vue')
		}
	]
})

export default router
